package org.jeecgframework.web.material.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

/**   
 * @Description: 产品库存
 * @date 2015-08-19 09:51:59
 * @version V1.0   
 *
 */
@Entity
@Table(name = "product_store", schema = "")
@SuppressWarnings("serial")
public class ProductStoreEntity implements java.io.Serializable {
	//ID
	private java.lang.String id;
	//产品ID
	private PProductEntity productId;
	//库存量
	private java.lang.Integer amount;
	//库存预警量
	private java.lang.Integer warningAmount;
	//备注
	private java.lang.String remark;
	//公司ID
	private CompanyEntity companyId;
	
	/**
	 *get方法: 取得ID
	 */
	@Id
	@GeneratedValue(generator = "paymentableGenerator")
	@GenericGenerator(name = "paymentableGenerator", strategy = "uuid")
	@Column(name ="ID",nullable=false,length=32)
	public java.lang.String getId(){
		return this.id;
	}

	/**
	 *set方法: 设置ID
	 */
	public void setId(java.lang.String id){
		this.id = id;
	}
	/**
	 *get方法: 取得产品ID
	 */
	@OneToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="PRODUCT_ID")
	public PProductEntity getProductId(){
		return this.productId;
	}

	/**
	 *set方法: 设置产品ID
	 */
	public void setProductId(PProductEntity productId){
		this.productId = productId;
	}
	/**
	 *get方法: 取得库存量
	 */
	@Column(name ="AMOUNT")
	public java.lang.Integer getAmount(){
		return this.amount;
	}

	/**
	 *set方法: 设置库存量
	 */
	public void setAmount(java.lang.Integer amount){
		this.amount = amount;
	}
	/**
	 *get方法: 取得库存预警量
	 */
	@Column(name ="WARNING_AMOUNT")
	public java.lang.Integer getWarningAmount(){
		return this.warningAmount;
	}

	/**
	 *set方法: 设置库存预警量
	 */
	public void setWarningAmount(java.lang.Integer warningAmount){
		this.warningAmount = warningAmount;
	}
	/**
	 *get方法: 取得备注
	 */
	@Column(name ="REMARK",nullable=true,length=45)
	public java.lang.String getRemark(){
		return this.remark;
	}

	/**
	 *set方法: 设置备注
	 */
	public void setRemark(java.lang.String remark){
		this.remark = remark;
	}
	/**
	 *get方法: 取得公司ID
	 */
	@OneToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="COMPANY_ID")
	public CompanyEntity getCompanyId(){
		return this.companyId;
	}

	/**
	 *set方法: 设置公司ID
	 */
	public void setCompanyId(CompanyEntity companyId){
		this.companyId = companyId;
	}
}
